import {
  post,
  get,
  put,
  dalete,
  postJosn,
  putone,
  patch,
  daleteJson
} from '../utils/request';

//分页查询商品活动列表
export function queryGoodsActivityList(data) {
  return post('/api/promotion-service/v1/promotionBuyFree/qryBuyFreeActiviteList', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/promotionBuyFree/qryBuyFreeActiviteList', data);
}

//发布撤回删除活动
export function updateGoodsActivityStatus(data) {
  return post('/api/promotion-service/v1/promotionBuyFree/editBuyFreeActiviteInfo?uuid='+data.uuid+'&status='+data.status);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/promotionBuyFree/editBuyFreeActiviteInfo?uuid='+data.uuid+'&status='+data.status);
}

//删除活动
export function deleteGoodsActivity(data) {
}

//获取活动详细
export function queryGiftActivityDetail(data){
  return post('/api/promotion-service/v1/promotionBuyFree/qryBuyFreeActiviteInfo?uuid='+data.uuid);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/promotionBuyFree/qryBuyFreeActiviteInfo?uuid='+data.uuid);
}

//活动商品分类列表
export function qryGoodsTypeList(data) {
  return post('/api/goods-service/v1/foreignGoods/qryGoodsTypeList', data)
  //return post('http://127.0.0.1:18080/api/goods-service/v1/foreignGoods/qryGoodsTypeList', data);
}

//挑选商品
export function queryChooseGoodsList(data) {
  return post('/api/goods-service/v1/foreignGoods/qryBuyFreeGoodsList', data)
  //return post('http://127.0.0.1:18080/api/goods-service/v1/foreignGoods/qryBuyFreeGoodsList', data);
}

//挑选赠品
export function queryChooseGiftsList(data) {
  return post('/api/promotion-service/v1/promotionBuyFree/qryGiftBank', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/promotionBuyFree/qryGiftBank', data);
}

//保存活动（全部数据）
export function saveGiftActivityWithGoods(data) {
  return post('/api/promotion-service/v1/promotionBuyFree/editBuyFreeActivite', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/promotionBuyFree/editBuyFreeActivite', data);
}

//活动列表
export function qrySpecialActivityList(data) {
  return post('/api/member-service/v1/BonuspointRule/qrySpecialActivityList', data);
}
//保存活动（全部数据）
export function saveSpecialActivityConfig(data) {
  return post('api/member-service/v1/BonuspointRule/saveSpecialActivityConfig', data);
}
//活动
export function qrySpecialActivityInfo(data) {
  return get('/api/member-service/v1/BonuspointRule/qrySpecialActivityInfo?uuid='+data.uuid);
}